<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converters="clr-namespace:ContactTracing.Core.Converters;assembly=ContactTracing.Core"
    xmlns:controls="clr-namespace:ContactTracing.CaseView.Controls">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/ContactTracing.WPF;component/Themes/Generic.xaml" />
    </ResourceDictionary.MergedDictionaries>
    

    <Style x:Key="IndividualReportBorderStyle" TargetType="Border">
        <Setter Property="BorderBrush" Value="{StaticResource IndividualReportBorderBrush}" />
        <Setter Property="BorderThickness" Value="1, 1, 0, 1" />
    </Style>

    <Style TargetType="{x:Type controls:SubTabButton}">
        <Setter Property="Foreground" Value="{StaticResource MediumTextBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" 
                    BorderBrush="{TemplateBinding BorderBrush}" 
                    Background="{TemplateBinding Background}" 
                    Padding="{TemplateBinding Padding}" 
                    CornerRadius="0">
                        <ContentControl VerticalAlignment="Center" HorizontalAlignment="Center">
                            <TextBlock Name="PART1" Style="{StaticResource Heading1}" Foreground="{TemplateBinding Foreground}"  VerticalAlignment="Center" HorizontalAlignment="Center" Text="{TemplateBinding Content}"/>
                        </ContentControl>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="Foreground" Value="{StaticResource AccentBrush}" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Foreground" Value="{StaticResource DarkTextBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type controls:TabButton}" x:Key="OldStyleTabButton">
        <Setter Property="Foreground" Value="{StaticResource DarkTextBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Grid x:Name="Grid">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="16" />
                        </Grid.RowDefinitions>
                        <Border 
                                    x:Name="Border" 
                                    Height="38"
                                    CornerRadius="0" 
                                    BorderThickness="0, 0, 0, 4"
                                    Margin="0, 0, 0, 0"
                                    Background="{StaticResource HatchForegroundBrush}"
                                TextBlock.FontSize="18"
                            TextBlock.FontWeight="SemiBold"
                                    BorderBrush="{StaticResource TabUnderlineBrush}">
                            <ContentPresenter 
                                    Margin="2"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    RecognizesAccessKey="True"/>
                        </Border>

                        <Path x:Name="Path" Grid.Row="1" Grid.RowSpan="1" Grid.Column="0" Canvas.ZIndex="2000" Height="7" Width="15" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,-1,15.375,0" 
                              Fill="{StaticResource TabUnderlineBrush}" Stroke="{StaticResource TabUnderlineBrush}"
                  Stretch="Fill" Data="M85,25 L85,25 L87.5,30 L90,25 z" RenderTransformOrigin="3.083,-1.417" Visibility="Collapsed"
                  StrokeThickness="0" />
                    </Grid>

                    <ControlTemplate.Triggers>
                        <!--<Trigger Property="IsKeyboardFocused" Value="true">
                                    <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DefaultedBorderBrush}" />
                                </Trigger>-->
                        <Trigger Property="IsChecked" Value="true">
                            <!--<Setter Property="Foreground" Value="#FFF2F2F2"/>-->
                            <Setter Property="Foreground" Value="{StaticResource HatchBackgroundBrush}"/>
                            <!--<Setter TargetName="Border" Property="Background" Value="#FF5EA8DE" />-->
                            <!--<Setter TargetName="Border" Property="Background" Value="{StaticResource DarkTextBrush}" />-->
                            <Setter TargetName="Border" Property="Background" Value="#002B4A" />
                            <Setter TargetName="Path" Property="Visibility" Value="Visible" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource AccentBrush}" />
                            <Setter TargetName="Path" Property="Stroke" Value="{StaticResource AccentBrush}" />
                            <Setter TargetName="Path" Property="Fill" Value="{StaticResource AccentBrush}" />
                            <!--<Setter TargetName="Border" Property="BorderBrush" Value="#FF5EA8DE" />-->
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Foreground" Value="White"/>
                            <!--<Setter TargetName="Border" Property="Background" Value="#F7F7F7" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="#FF5EA8DE" />-->
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <!--<Setter TargetName="Border" Property="Background" Value="#777879" />-->
                            <!--<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />-->
                            <Setter Property="Foreground" Value="#D8DADA"/>
                        </Trigger>
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="{x:Type controls:TabButton}">
        <Setter Property="Foreground" Value="{StaticResource DarkTextBrush}"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Border 
                        x:Name="Border" 
                        MinHeight="32"
                        CornerRadius="0" 
                        BorderThickness="0, 0, 1, 1"
                        Margin="0, 0, 0, 0"
                        Background="#EDEDF0"
                        TextBlock.FontSize="18"
                        TextBlock.FontWeight="SemiBold"
                        BorderBrush="#BCBCBF">
                        <ContentPresenter 
                                Margin="2"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                RecognizesAccessKey="True"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="true">
                            <!--<Setter Property="Foreground" Value="{StaticResource HatchBackgroundBrush}"/>-->
                            <Setter TargetName="Border" Property="Background" Value="#CDCDD0" />
                            <!--<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource AccentBrush}" />-->
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Foreground" Value="#888889"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="#D8DADA"/>
                        </Trigger>
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
